import { FilterDTO } from "@/utils/api/interface/index";

import http from "@/utils/api";

export const productView = (id: string) => {
	return http.get<ProductDTO>(`/product/` + id);
};
export const productDelete = (id: string) => {
	return http.delete<ProductDTO>(`/product/` + id);
};

export const productList = (params: FilterDTO) => {
	return http.post<ProductDTO[]>(`/product/list`, params);
};
export const productSave = (params: ProductDTO) => {
	return http.post<ProductDTO>(`/product/save`, params);
};

// 商品
export interface ProductDTO {
	 productId: string;
     productCode: string;
     productName: string;
     note: string;
     createBy: string;
     createTime: string;
     updateBy: string;
     updateTime: string;
}

